(function(H)
{
    var protocol = window.location.protocol;
    var defaultOptionsZhCn = {
        lang: {
            contextButtonTitle: "{start{:__('图表导出菜单')}end}",
            decimalPoint: ".",
            downloadJPEG: "{start{:__('下载JPEG图片')}end}",
            downloadPDF: "{start{:__('下载PDF文件')}end}",
            downloadPNG: "{start{:__('下载PNG文件')}end}",
            downloadSVG: "{start{:__('下载SVG文件')}end}",
            drillUpText: "{start{:__('返回')}end} {series.name}",
            invalidDate: "{start{:__('无效的时间')}end}",
            loading: "{start{:__('加载中...')}end}",
            months: ["{start{:__('一月')}end}", "{start{:__('二月')}end}", "{start{:__('三月')}end}", "{start{:__('四月')}end}", "{start{:__('五月')}end}", "{start{:__('六月')}end}", "{start{:__('七月')}end}", "{start{:__('八月')}end}", "{start{:__('九月')}end}", "{start{:__('十月')}end}", "{start{:__('十一月')}end}", "{start{:__('十二月')}end}"],
            noData: "{start{:__('没有数据')}end}",
            numericSymbols: null,
            printChart: "{start{:__('打印图表')}end}",
            resetZoom: "{start{:__('重置缩放比例')}end}",
            resetZoomTitle: "{start{:__('重置为原始大小')}end}",
            shortMonths: ["{start{:__('一月')}end}", "{start{:__('二月')}end}", "{start{:__('三月')}end}", "{start{:__('四月')}end}", "{start{:__('五月')}end}", "{start{:__('六月')}end}", "{start{:__('七月')}end}", "{start{:__('八月')}end}", "{start{:__('九月')}end}", "{start{:__('十月')}end}", "{start{:__('十一月')}end}", "{start{:__('十二月')}end}"],
            thousandsSep: ",",
            weekdays: ["{start{:__('星期天')}end}", "{start{:__('星期一')}end}", "{start{:__('星期二')}end}", "{start{:__('星期三')}end}", "{start{:__('星期四')}end}", "{start{:__('星期五')}end}", "{start{:__('星期六')}end}"],
            rangeSelectorFrom: "{start{:__('开始时间')}end}",
            rangeSelectorTo: "{start{:__('结束时间')}end}",
            rangeSelectorZoom: "{start{:__('范围')}end}",
            zoomIn: "{start{:__('缩小')}end}",
            zoomOut: "{start{:__('放大')}end}"
        },
        global: {
            canvasToolsURL: protocol + "//cdn.hcharts.cn/highcharts/modules/canvas-tools.js",
            VMLRadialGradientURL: protocol + +"static/image/vml-radial-gradient.png"
        },
        title: { text: "{start{:__('图表标题')}end}" },
        tooltip: {
            dateTimeLabelFormats: {
                millisecond: "%H:%M:%S.%L",
                second: "%H:%M:%S",
                minute: "%H:%M",
                hour: "%H:%M",
                day: "%Y-%m-%d",
                week: "%Y-%m-%d",
                month: "%Y-%m",
                year: "%Y"
            },
            split: false
        },
        exporting: { url: protocol + "//export.highcharts.com.cn" },
        credits: {
            text: "Highcharts.com.cn",
            href: "https://www.highcharts.com.cn"
        },
        xAxis: { dateTimeLabelFormats: {
                millisecond: "%H:%M:%S.%L",
                second: "%H:%M:%S",
                minute: "%H:%M",
                hour: "%H:%M",
                day: "%Y-%m-%d",
                week: "%Y-%m",
                month: "%Y-%m",
                year: "%Y"
            } },
        rangeSelector: {
            inputDateFormat: "%Y-%m-%d",
            buttonTheme: {
                width: "auto",
                style: {
                    fontSize: "12px",
                    padding: "4px"
                }
            },
            buttons: [
                {
                    type: "month",
                    count: 1,
                    text: "{start{:__('月')}end}"
                },
                {
                    type: "month",
                    count: 3,
                    text: "{start{:__('季度')}end}"
                },
                {
                    type: "month",
                    count: 6,
                    text: "{start{:__('半年')}end}"
                },
                {
                    type: "ytd",
                    text: "YTD"
                },
                {
                    type: "year",
                    count: 1,
                    text: "{start{:__('年')}end}"
                },
                {
                    type: "all",
                    text: "{start{:__('所有')}end}"
                }
            ]
        },
        plotOptions: {
            series: { dataGrouping: { dateTimeLabelFormats: {
                        millisecond: ["%Y-%m-%d %H:%M:%S.%L", "%Y-%m-%d %H:%M:%S.%L", " ~ %H:%M:%S.%L"],
                        second: ["%Y-%m-%d %H:%M:%S", "%Y-%m-%d %H:%M:%S", " ~ %H:%M:%S"],
                        minute: ["%Y-%m-%d %H:%M", "%Y-%m-%d %H:%M", " ~ %H:%M"],
                        hour: ["%Y-%m-%d %H:%M", "%Y-%m-%d %H:%M", " ~ %H:%M"],
                        day: ["%Y-%m-%d", "%Y-%m-%d", " ~ %Y-%m-%d"],
                        week: ["%Y-%m-%d", "%Y-%m-%d", " ~ %Y-%m-%d"],
                        month: ["%Y-%m", "%Y-%m", " ~ %Y-%m"],
                        year: ["%Y", "%Y", " ~ %Y"]
                    } } },
            ohlc: { tooltip: {
                    split: false,
                    pointFormat: '<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>' + "{start{:__('开盘')}end}：{point.open}<br/>" + "{start{:__('最高')}end}：{point.high}<br/>" + "{start{:__('最低')}end}：{point.low}<br/>" + "{start{:__('收盘')}end}：{point.close}<br/>"
                } },
            candlestick: { tooltip: {
                    split: false,
                    pointFormat: '<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>' + "{start{:__('开盘')}end}：{point.open}<br/>" + "{start{:__('最高')}end}：{point.high}<br/>" + "{start{:__('最低')}end}：{point.low}<br/>" + "{start{:__('收盘')}end}：{point.close}<br/>"
                } }
        }
    };
H.setOptions(defaultOptionsZhCn)
})(Highcharts);
